<?php
/*
 * Created on 04.01.2006
 *
 */

m2import('phpinchains/Filter.php');

/**
 * Filter for XICS Apps, that sets the XICSAppParams config parameter in the env
 * One can add params to Model2 Constructor named XICSAppParams
 * <code>$model = new Model2($env, array('XICSAppParams' => $params), ...)</code>
 * and retrieve it from the env within his action
 * <code>$env->getAttribute('AppParams')</code>
 */
class AppParamFilter extends phpinchains_Filter
{

    var $params;

    function init (& $config)
    {
        $this->params = $config['params'];
    }

    function doFilter (& $env, & $chain)
    {
        $env->setZombie('AppParams', $this->params);
        $chain->doFilter($env);
    }

}

?>
